home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / lib / alib / wbmain.a < prev   
Text File  |  1994-02-01  |  844b  |  34 lines

  1.  
  2.             ;    AutoInit0 brought in if the normal _main entry
  3.             ;    point is used (due to _main making a dummy
  4.             ;    reference to __waitwbmsg)
  5.             ;
  6.             ;    Since this is the first module in AUTO.LIB and
  7.             ;    always referenced on the first pass, it will occur
  8.             ;    before ANY library is openned, which is what we
  9.             ;    want.
  10.  
  11.             section autoinit0,code
  12.  
  13.             xref    _LVOWaitPort
  14.             xref    _LVOGetMsg
  15.             xref    __WBMsg
  16.  
  17.             xdef    __waitwbmsg
  18.  
  19. __waitwbmsg        move.l  $114(A6),A0     ; ThisTask
  20.             cmp.b   #13,8(A0)       ; NT_PROCESS ?
  21.             bne     wwm100
  22.             tst.l   $AC(A0)         ; pr_CLI ?
  23.             bne     wwm100
  24.             lea     $5C(A0),A0      ; message port
  25.             move.l  A0,-(sp)
  26.             jsr     _LVOWaitPort(A6)
  27.             move.l  (sp)+,A0
  28.             jsr     _LVOGetMsg(A6)
  29.             move.l  D0,__WBMsg(A4)
  30. wwm100
  31.  
  32.             END
  33.  
  34.